import request from '@/sheep/request';

export default {
    // 入职申请
    entry_infoAddAPI: (data) =>
    request({
        url: 'api/entry_info/add',
        method: 'POST',
        data,
        custom: {
            showSuccess: true,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: true,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    //离职审核列表
	getDimissionApplyApproveList: (params) =>
    request({
        url: 'api/dimission/approve_list',
        method: 'GET',
        params,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: true,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    //离职列表
    getDimissionList: (params) =>
    request({
        url: 'api/dimission/index',
        method: 'GET',
        params,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: true,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    //离职详情
	getDimissionView: (params) =>
		request({
			url: 'api/dimission/view',
			method: 'GET',
			params,
			custom: {
				showSuccess: false,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: true,
                loadingMsg: '加载中',
                auth: true,
			},
		}),
    //离职通过
    getDimissionPass: (params) =>
        request({
            url: 'api/dimission/pass',
            method: 'GET',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
    //离职拒绝
    getDimissionRefuse: (params) =>
        request({
            url: 'api/dimission/refuse',
            method: 'POST',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
    // 离职添加
    postDimissionAdd: (data) =>
    request({
        url: 'api/dimission/add',
        method: 'POST',
        data,
        custom: {
            showSuccess: true,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),

    // 个人中心离职列表
    dimissionProjectIndex: (params) =>
    request({
        url: 'api/dimission_project/index',
        method: 'GET',
        params,
        custom: {
            showSuccess: true,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    // 个人中心离职详情
    dimissionProjectView: (params) =>
        request({
            url: 'api/dimission_project/view',
            method: 'GET',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
    // 个人中心离职审批  通过
    dimissionProjectPass: (params) =>
        request({
            url: 'api/dimission_project/pass',
            method: 'POST',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
    // 个人中心审批列表
    dimissionProjectApproveList: (params) =>
        request({
            url: 'api/dimission_project/approve_list',
            method: 'GET',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
    // 个人中心离职审批  拒绝
    dimissionProjectRefuse: (params) =>
        request({
            url: 'api/dimission_project/refuse',
            method: 'POST',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
    // 个人中心离职申请
    dimissionProjectAdd: (params) =>
        request({
            url: 'api/dimission_project/add',
            method: 'POST',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
};